package com.seedeer.project.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.seedeer.project.domain.enums.OperatorType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author wangqiang
 */
@TableName("bbc_action_log")
@ApiModel(value = "ActionLog对象", description = "")
public class ActionLog {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "动作名称")
    @TableField("action_name")
    private String actionName;

    @ApiModelProperty(value = "请求URL")
    @TableField("request_url")
    private String requestUrl;

    @ApiModelProperty(value = "请求方式")
    @TableField("request_method")
    private String requestMethod;

    @ApiModelProperty(value = "请求参数")
    @TableField("request_param")
    private String requestParam;

    @ApiModelProperty(value = "返回参数")
    @TableField("response_body")
    private String responseBody;

    @ApiModelProperty(value = "异常信息")
    @TableField("exception")
    private String exception;

    @ApiModelProperty(value = "操作类别（0.其它 1.后台用户 2.手机端用户）")
    @TableField("operator_type")
    private OperatorType operatorType;

    @ApiModelProperty(value = "操作人编码")
    @TableField("operator_code")
    private String operatorCode;

    @ApiModelProperty(value = "动作时间")
    @TableField("action_time")
    private LocalDateTime actionTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getActionName() {
        return actionName;
    }

    public void setActionName(String actionName) {
        this.actionName = actionName;
    }

    public String getRequestUrl() {
        return requestUrl;
    }

    public void setRequestUrl(String requestUrl) {
        this.requestUrl = requestUrl;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public String getRequestParam() {
        return requestParam;
    }

    public void setRequestParam(String requestParam) {
        this.requestParam = requestParam;
    }

    public String getResponseBody() {
        return responseBody;
    }

    public void setResponseBody(String responseBody) {
        this.responseBody = responseBody;
    }

    public String getException() {
        return exception;
    }

    public void setException(String exception) {
        this.exception = exception;
    }

    public OperatorType getOperatorType() {
        return operatorType;
    }

    public void setOperatorType(OperatorType operatorType) {
        this.operatorType = operatorType;
    }

    public String getOperatorCode() {
        return operatorCode;
    }

    public void setOperatorCode(String operatorCode) {
        this.operatorCode = operatorCode;
    }

    public LocalDateTime getActionTime() {
        return actionTime;
    }

    public void setActionTime(LocalDateTime actionTime) {
        this.actionTime = actionTime;
    }

    @Override
    public String toString() {
        return "ActionLog{" +
                "id=" + id +
                ", actionName=" + actionName +
                ", requestUrl=" + requestUrl +
                ", requestMethod=" + requestMethod +
                ", requestParam=" + requestParam +
                ", responseBody=" + responseBody +
                ", exception=" + exception +
                ", operatorType=" + operatorType +
                ", operatorCode=" + operatorCode +
                ", actionTime=" + actionTime +
                "}";
    }
}